package cn.dansj.entity;

import cn.dansj.bean.TableConstant;
import cn.dansj.enums.GlobalEnv;
import cn.dansj.common.utils.transfer.DefaultMethods;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;

import java.io.Serial;
import java.io.Serializable;
import java.sql.Timestamp;

@Entity
@Table(name = TableConstant.shortlink)
public class ShortLink extends DefaultMethods implements Serializable {
    @Serial
    private static final long serialVersionUID = GlobalEnv.SerialVersionUID;
    @Id
    private String sequence = String.valueOf(System.currentTimeMillis());
    private int userId;
    private String shortLink;
    private String url;
    private String comment;
    private Timestamp createTime;
    private Timestamp updateTime;
    private Timestamp expireTime;

    public String getSequence() {
        return sequence;
    }

    public void setSequence(String sequence) {
        this.sequence = sequence;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getShortLink() {
        return shortLink;
    }

    public void setShortLink(String shortLink) {
        this.shortLink = shortLink;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public Timestamp getExpireTime() {
        return expireTime;
    }

    public void setExpireTime(Timestamp expireTime) {
        this.expireTime = expireTime;
    }
}
